#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  int i = 0, num_req = 1;
  unsigned long j = 0;
  int *indexarr = (int *)malloc(sizeof(int) * 400);


  if (argc > 1)
    num_req = atoi(argv[1]);

  int offset = atoi(argv[2]);
  if (offset == 8)
    offset = 0;

  int ind = 0;
  for (j = 0; j < 400; j++)
  {
    //indexarr[j] = (num_req * j) / 50 + (num_req * j * offset) / 400;
    indexarr[j] = ind;
    if (num_req != 0 && (i >= (400 / num_req)))
    {
        i = 0;
        ind += 8;
    }
    i++;
  }

  for (i = 0; i < 400; i++)
    printf("#define indexarr%d %d\n", i, indexarr[i]);

  return 0;
}
